package seatiger.tomcat.catalina.connector;

import javax.servlet.ServletInputStream;
import java.io.IOException;

/**
 * 用于报文体中的数据  返回的给servlet用户使用的流
 */
public class CoyoteInputStream extends ServletInputStream {

    protected InputBuffer ib;

    protected CoyoteInputStream(InputBuffer ib) {
        this.ib = ib;
    }

    @Override
    public int read() throws IOException {
        return 0;
    }

    @Override
    public int read(byte[] b) throws IOException {
        return ib.read(b,0,b.length);
    }
}
